<!-- src/components/6BuildInComp/3KeepAliveCache/ComC.vue -->
<template>
  <div>
    <h2>Component C</h2>
    <input v-model="text" placeholder="Type something..." />
    <p>You typed: {{ text }}</p>
  </div>
</template>

<script setup>
import { ref } from 'vue'
import { onActivated, onDeactivated } from 'vue'

const text = ref("example")

onActivated(() => {
  console.log('ComC onActivated')
})

onDeactivated(() => {
  console.log('ComC onDeactivated')
})
</script>

<script>
export default {
  name: 'ComC'
}
</script>